class MissionRegistration < ActiveRecord::Base
  belongs_to :mission
  belongs_to :character
  belongs_to :member

  def MissionRegistration::for_character_and_mission(member, 
                                                     character, 
                                                     mission, 
                                                     is_leader)
    m = MissionRegistration.new
    m.character = character
    m.mission = mission
    m.member = member
    m.is_leader = is_leader
    return m
  end
  
  def is_leader?
    return true if is_leader == 0 else false
  end
end
